﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Pixysoft.Framework.Configurations
{
    public interface IHtmlNode
    {
        string ElementName { get;set;}

        string Text { get;set;}

        string RawAttribute { get;set;}

        IHtmlNodeCollection Node { get;}

        IHtmlNodesCollection Nodes { get;}

        string HtmlId { get;}

        string HtmlClass { get;}


        /// <summary>
        /// 是否包含子节点或者内容
        /// </summary>
        bool IsEmpty { get;}

        /// <summary>
        /// 是否满足html的基本格式 例如declaration就不满足
        /// </summary>
        bool IsWellFormatted { get;}

        /// <summary>
        /// 父节点的表序列
        /// </summary>
        string ParentPath { get;}

        /// <summary>
        /// 嵌套层次
        /// </summary>
        int NestLevel { get;}

        /// <summary>
        /// 当前表序列
        /// </summary>
        int NodeIndex { get;}


        string GetPlainNodeBody();


        string Serialize();

        string Serialize(bool indent);

        string SerializeToLayout();
    }
}
